package com.example.controller;

import com.example.service.ItestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by lipain on 2017/5/5.
 */

@Controller
@RequestMapping(value = "/hello")
public class HelloWorldController {

    @Autowired
    ItestService testService;

    @RequestMapping(value = "/get.json")
    public
    @ResponseBody
    Map<String, Object> helloWorld() {
        System.err.println("调用成功");
        Map<String, Object> res = new HashMap<>();
        res.put("url", "张三");
        res.put("url1", "李四");
        testService.test();
        return res;
    }
}
